package com.lion.hbase.exception;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * 异常处理类
 * @author 李永曜
 * 2015年6月17日
 */
public class HbaseClientException extends Throwable {
	private static final Log LOG = LogFactory.getLog(HbaseClientException.class);
	private static final long serialVersionUID = -3481317888566781655L;
	private String message;

	public HbaseClientException(String message) {
		this.message = message;
		LOG.error(message);
	}

	public HbaseClientException(String message, Throwable ex) {
		this(message);
		super.setStackTrace(ex.getStackTrace());
		LOG.error(message,ex);
	}

	@Override
	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

}
